<?php $this->pageTitle=Yii::app()->name . ' - '.AdminModule::t("Change Password");
$this->breadcrumbs=array(
	//AdminModule::t("Profile") => Yii::app()->createUrl("admin/profile/edit"),
	AdminModule::t("Change Password"),
);
?>
<?php echo $this->renderPartial('menu'); ?>

<div class="admin_table">
<h1><?php echo AdminModule::t("Change password"); ?></h1>

<div class="link">
<?php echo CHtml::link('Edit Profile',ApplicationConfig::getURL("admin", "profile", "edit"),array('class'=>'search-button')); ?>
</div>

<?php $form=$this->beginWidget('UActiveForm', array(
	'id'=>'changepassword-form',
	'enableAjaxValidation'=>true,
)); ?>

<?php if(Yii::app()->user->hasFlash('changestatus')):?>
<div class="flash-success">
<?php echo Yii::app()->user->getFlash('changestatus'); ?>
</div>
<?php endif; ?>

<?php 
if(isset($_POST['Admin']['password']))
	$passwd = $_POST['Admin']['password'];
else 
	$passwd = "";	 
?>	
	<p class="note"><?php echo AdminModule::t('Fields with <span class="required">*</span> are required.'); ?></p>
	<?php echo CHtml::errorSummary($model); ?>

	<div class="row">
	<?php echo $form->labelEx($user,'password'); ?>
	<?php echo $form->passwordField($user,'password',array('value'=>$passwd)); ?>
	<?php echo $form->error($user,'password'); ?>
	<p class="hint">
	<?php echo AdminModule::t("Minimal password length 4 symbols."); ?>
	</p>
	</div>
	
	<div class="row">
	<?php echo "<b>New</b> ".$form->labelEx($model,'password'); ?>
	<?php echo $form->passwordField($model,'password'); ?>
	<?php echo $form->error($model,'password'); ?>
	<p class="hint">
	<?php echo AdminModule::t("(Minimal password length 4 symbols.)"); ?>
	</p>
	</div>
	
	<div class="row">
	<?php echo $form->labelEx($model,'verifyPassword'); ?>
	<?php echo $form->passwordField($model,'verifyPassword'); ?>
	<?php echo $form->error($model,'verifyPassword'); ?>
	</div>
	
    <div class="clear"></div><br />
	
	<div class="row submit">
	<?php echo CHtml::submitButton(AdminModule::t("Save")); ?>
	</div>

<?php $this->endWidget(); ?>
</div><!-- form -->